home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Communication / Weather / Source / state.h < prev    next >
C/C++ Source or Header  |  1993-11-13  |  973b  |  42 lines

  1. #ifndef STATE_H
  2. #define STATE_H
  3.  
  4. typedef enum { Plain, Pattern, Status, Goto, FlushS, Pause, CmdS } SType;
  5.  
  6. typedef struct String {
  7.     char *s;
  8.     struct String *next;
  9. } String;
  10.  
  11. typedef struct MenuItem {
  12.     char *send, *get, *label;
  13.     struct MenuItem *next;
  14. } MenuItem;
  15.  
  16. typedef struct {
  17.     int type;
  18.     char *name;
  19.     char *first, *last, *label;
  20.     String *l;
  21.     MenuItem *m;
  22. } State;
  23.  
  24. extern State *state(char *s);
  25. extern void ReadState(char *s);
  26. extern void setState(char *s);
  27. extern void execState(State *s, char *t);
  28. extern void runState(char *s);
  29. extern int numItem(char *s);
  30. extern void setMenu(char *s);
  31. extern MenuItem *curMenuItem(int n);
  32. extern char *getLabel(MenuItem *m);
  33. extern char *getSend(MenuItem *m);
  34. extern char *getGet(MenuItem *m);
  35. extern char *curMenuFirst(void);
  36. extern char *curMenuLast(void);
  37. extern char *getReport(char *buf);
  38. extern MenuItem *menuFor(char *label, char *name);
  39. extern void fetchReport(char *label, char *buf);
  40.  
  41. #endif
  42.